﻿using Abp.Application.Services.Dto;
using Abp.AutoMapper;
using AutoMapper;
using FwProject.Car.Dto;
using FwProject.Comm.ExcelUtil;
using FwProject.Core.Restaurant;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;

namespace FwProject.Restaurant.Dto
{
    [AutoMapFrom(typeof(LoadCar))]
    [DisplayName(displayName:"装车单")]
    public class LoadCarOutputDto:EntityDto<Guid>
    {
        /// <summary>
        /// 装车单号
        /// </summary>
        [ExcelDateMember(IsMultiRow =false,IsMerged =false)]
        [DisplayName(displayName:"装车单号")]
        public string CreationNumber { get; set; }
        /// <summary>
        /// 审核状态
        /// </summary>
        [ExcelDateMember(IsMultiRow = false, IsMerged = false)]
        [DisplayName(displayName: "审核状态")]
        public ExamineStatus ExamineStatus { get; set; }

        /// <summary>
        /// 装车状态
        /// </summary>
        [ExcelDateMember(IsMultiRow = false, IsMerged = false)]
        [DisplayName(displayName: "配送状态")]
        public CarStatus CarStatus { get; set; }


        /// <summary>
        /// 装车日期
        /// </summary>
        [ExcelDateMember(IsMultiRow = false, IsMerged = false)]
        [DisplayName(displayName: "装车日期")]
        public DateTime CreationTime { get; set; }


        public DateTime? BackStatusOverTime { get; set; }


        public DateTime? OverTime { get; set; }

        /// <summary>
        /// 车辆
        /// </summary>
        [ExcelDateMember(IsMultiRow = false, IsMerged = false)]
        public CarInfoDto CarInfoModel { get; set; }

        /// <summary>
        /// 装车明细
        /// </summary>
        public ICollection<LoadingCarDto> LoadingCarInfoList { get; set; }

        /// <summary>
        /// 已配送餐厅数量
        /// </summary>
        [IgnoreMap]
        [ExcelDateMember(IsMultiRow = false, IsMerged = false)]
        [DisplayName(displayName: "已配送餐厅数")]
        public int DeliveredCount { get; set; }

        /// <summary>
        /// 司机名称
        /// </summary>
        [IgnoreMap]
        public string DriverName { get; set; }
    }
}
